The script meoh runs NWChem to produce an optimized methanol structure.

NAMD requires topology and parameter files from the CHARMM32 parameterization.
The scripts find these through the environment variable NAMD_TOPPAR, defined
elsewhere through

setenv NAMD_TOPPAR <wherever you've installed the files>

The location could be hardcoded into the scripts but this strategy is more 
flexible, particularly if running on different machines.  The scripts then are
portable without modification.

A number of other molecules (residues in the CHARMM vernacular) are defined in the
files top_mac.inp and par_mac.inp.  These are included in this directory but 
could be moved to wherever to decide to put the other files, as is assumed in 
the script.

It is also convenient to install the modules environment for application support.
This provides a simple means to define all of the necessary paths and environment
variables for multiple code versions and keep them separate.

module load namd    !  will define the path to namd and any other ancillary stuff

The first step in the process was to create the structure file, through the use
of psfgen:

psfgen meoh_01.inp > meoh_01.out

This reads the methanol12.pdb files and creates an initial .psf structure file and
a .pdb coordinate file.

These two files serve as input to VMD for the next step, which is to put a large
box of water around the methanol molecules.

Open VMD and from the command line type the following:

solvate meoh_01.psf meoh_01.pdb -o meoh_02 -t 15

source box_molecule.tcl
box_molecule 0

The solvate command will put a large box of water around the methanol molecules.
The box molecule script draws a box around everything and reports the box size
and center.  These data are used in the subsequent scripts.

Running NAMD is performed via the following commands where p is the number of
processes (1 per processor):

module load namd

namd2 +p8 meoh_03.inp > meoh_03.out

This will create the .out output file along with several other files that 
include current coordinates, velocities and a .dcd trajectory file.
The .inp files look for the previous output files as input and then write
more output files.  The sequence is encoded in the file names.

